Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Error when sending symbols only in chat #121

Merged
merged 3 commits into from
Apr 15, 2021

Conversation

Simperfy
Copy link
Collaborator

This should fix the issue when sending a chat composed of symbols only.
ie: ":)"

There already an issue regarding this web-mech/badwords#103
and fix that is yet to be merged web-mech/badwords#95

chat.symbols.only.fix.mp4

@@ -68,10 +68,18 @@ class Chat {
if (result === undefined) throw new Error(`Server returned an unknown scope: ${scope}`);
}

isAlphaNumeric(str) {
return str.match("^[A-Za-z0-9]+$");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isAlphaNumeric does not detect messages containing white space characters as target for filtering.
^[\w\s]+$
would match that kind of messages

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated at 7007eb0

@Arcanorum Arcanorum merged commit 587decf into Arcanorum:master Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants